#include <iostream>
#include<cmath>
using namespace std;
void text1(){
	int x = 91;
	int y = 100;
	int count = 0;
	while(y>0){
		if(x>100){
			x-=10;
			y--;
		}else{
			x++;
			count++;
		}
	}
	cout<<count<<endl;
}
void text2(int n){
	int j=0;
	int k=0;
	while(k<n){
		j++;
		k+=10*j;
		 
	}
	cout<<j<<endl<<floor((sqrt(25+20*n)-5)/10)+1<<endl;
}
int main(){
	text1();
	text2(12345);
	return 0;
}
